<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ApplicationForm extends Model
{
    use SoftDeletes;
    protected $table = 'application_form';
    public $fillable = ['school_ids','club_ids','form_name','status'];

    public function getSchoolIdsAttribute($value)
    {
        return explode(',', $value);
    }

    public function setSchoolIdsAttribute($value)
    {
        $this->attributes['school_ids'] = implode(',', $value);
    }

    public function getClubIdsAttribute($value)
    {
        return explode(',', $value);
    }

    public function setClubIdsAttribute($value)
    {
        $this->attributes['club_ids'] = implode(',', $value);
    }
}
